package com.gitee.shigen.security.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gitee.shigen.security.entity.Role;
import com.gitee.shigen.security.mapper.RoleMapper;
import com.gitee.shigen.security.service.IRoleService;
import java.util.List;
import org.springframework.stereotype.Service;

/**
 * @author shigenfu
 * @since 2024-01-21
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IRoleService {

    @Override
    public List<Role> getUserRoles(Long userId) {
        return getBaseMapper().selectByUserId(userId);
    }

    @Override
    public List<Role> getRoleList() {
        return getBaseMapper().selectList(null);
    }
}
